package com.owen.spring.cloud.seata.at.controller;

import com.owen.spring.cloud.seata.at.entity.AccountTbl;
import com.owen.spring.cloud.seata.at.service.AccountTblService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountTblController {

    @Autowired
    private AccountTblService accountTblService;

    @PostMapping("/save")
    public AccountTbl save(@RequestBody AccountTbl accountTbl){
        accountTblService.save(accountTbl);
        return accountTbl;
    }

}
